package io.renren.controller;

import io.renren.constant.AppConstant;
import io.renren.entity.ConvenienceInfo;
import io.renren.service.ConvenienceInfoService;
import io.renren.vo.RespModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/convenienceInfo")
@Api(tags = "便民服务")
public class ConvenienceInfoController {

    @Autowired
    private ConvenienceInfoService convenienceInfoService;

    @GetMapping(value = "/list", produces = MediaType.APPLICATION_JSON_VALUE)
    @ApiOperation(value = "查询便民服务信息", produces = MediaType.APPLICATION_JSON_VALUE)
//    @com.cxytiandi.encrypt.springboot.annotation.Decrypt
    @com.cxytiandi.encrypt.springboot.annotation.Encrypt
    public RespModel getCgsInfoList() {
        List<ConvenienceInfo> convenienceInfos = convenienceInfoService.selectList();
        return new RespModel("SUCCESS", "000", "", convenienceInfos);
    }

}
